package com.slz3.business.module.goodsManagement.gooTypeLevel1.domain;

import com.slz3.business.frame.annotation.ConfigDomain;
import com.slz3.business.module.goodsManagement.gooTypeLevel1.repository.GooTypeLevel1Repository;
import com.slz3.business.module.goodsManagement.gooTypeLevel2.domain.GooTypeLevel2;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;
@ConfigDomain(repositoryClass = GooTypeLevel1Repository.class)
@Entity
@Table(schema = "goods_management", name = "goo_type_level1")
@Data
@EqualsAndHashCode(callSuper = true)
public class GooTypeLevel1 extends GooTypeLevel1Entity {

    /**
     * 自增 Long
     */
    @Column(insertable = false)
    @ColumnDefault("nextval('mishang_old_frame_id_seq')")
    private Long incrementId;


    /**
     * 二级分类集合
     */
    @Transient
    private List<GooTypeLevel2> gooTypeLevel2List;
}
